package com.icloud.system.boot.dto;

import com.icloud.common.core.constant.ValidateConstant;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * 权限保存参数
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class AdminPermissionSaveDto {
    @NotNull(message = ValidateConstant.NOT_NULL)
    @ApiModelProperty(value = "父级权限ID")
    private Long pid;

    @NotBlank(message = ValidateConstant.NOT_BLANK)
    @ApiModelProperty(value = "权限名称")
    private String name;

    @NotBlank(message = ValidateConstant.NOT_BLANK)
    @ApiModelProperty(value = "权限值(权限路由)")
    private String value;

    @NotNull(message = ValidateConstant.NOT_NULL)
    @ApiModelProperty(value = "权限类型：0->目录；1->菜单；2->按钮")
    private int type;

    @NotNull(message = ValidateConstant.NOT_NULL)
    @ApiModelProperty(value = "排序")
    private Integer sort = 0;
}
